using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using GBU.Platform;
using Java.IO;

namespace dCamera.demo
{
    [Activity(Label = "My Activity")]
    public class PhotoShow : Activity
    {
        private ImageView imgShow;
        private string filePath;
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            filePath = Intent.Extras.GetString("file");

            // Create your application here
            SetContentView(Resource.Layout.PhotoShow);

            imgShow = FindViewById<ImageView>(Resource.Id.imgShow);

            imgShow.ViewTreeObserver.GlobalLayout += new EventHandler(ViewTreeObserver_GlobalLayout);

          //  imgShow.LoadFromFile(file);
        }

        void ViewTreeObserver_GlobalLayout(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(filePath))
            {
                imgShow.LoadFromFile(filePath);
            }
        }
    }
}